# 封装断言
from api.login_api import ihrmLogin


def assert_login(status_code,success,code,message,resp):
    assert status_code == resp.status_code
    assert success == resp.json().get('success')
    assert code == resp.json().get('code')
    assert message in resp.json().get('message')


# if __name__ == '__main__':
#     resp = ihrmLogin.ihrm_login('13800000002', '123456')
#     print(resp.json())
#     assert_login(200, True, 10000, '成功', resp)